1. Field
Aspects of the exemplary embodiments relate to a display apparatus and a method for displaying a highlight thereof, and more particularly, to a display apparatus which generates and displays a highlight on a menu item selected by a user, and a method for displaying a highlight thereof.
2. Description of the Related Art
In order to provide a user with a User Interface (UI), a graphic-based operating system offers pre-defined UI toolkits at a platform level. Conventionally, the focus has been directed towards providing UIs by providing UI toolkits including features such as a button, a text box, and a list, but recently, an animation effect has been added to a UI configuration element to provide a user with more diverse User Experiences (UX). For example, a page flip, a window start and end animation, a highlight on a menu item, etc., are provided.
In particular, the highlight displayed on a menu item indicates a user's selection of a desired menu item from among a plurality of menu items, and may be moved between menu items in a direction input by the user. However, the recent menu items vary in their size and shape, so the highlight should be changed according to the size and shape of the menu item to which the highlight is moved. For example, as illustrated in FIG. 1A, if the highlight is moved from the first menu item 110 to the second menu item 120, the size and the shape of the highlight (e.g., the highlighted perimeter) should be changed to fit the size and shape of the second menu item 120. In addition, as illustrated in FIG. 1B, the depth of the highlight should not change even if the highlight moves between menu items in different sizes and shapes.
FIG. 1C illustrates an example of a screen to which an animation for increasing the size of a highlight when the highlight moves is applied. When the size of the highlight increases gradually, a display apparatus should generate 60 images per second in order to provide a smooth animation effect. That is, if the animation is played for 0.5 seconds, the display apparatus should generate 30 highlights in a row. In other words, the time for generating the highlight should be minimized in order to present a smooth animation.
However, the conventional nine-patch method uses a separate source image to generate a configuration element of a highlight at each side of a menu item, so the amount to be processed increases and thus the conventional nine-patch method takes considerable time to generate a highlight. Hereinafter, the method for generating a highlight using the conventional nine-patch method will be described with reference to FIGS. 2A to 2D.
FIG. 2A is a view provided to explain a highlight of which a size is changeable according to the nine-patch method. Herein, the feature the size of a highlight is changeable refers to the feature that the width and length of the square of the highlight are changeable according to the nine-patch method. The conventional nine-patch method divides the display area of the highlight into 9 sub areas. In this case, the areas of 1, 3, 7 and 9 are for displaying the corners of the highlight, the areas of 2 and 8 are for displaying the width of the highlight, the areas of 4 and 6 are for displaying the length of the highlight, and the area of 5 is for displaying a menu item. In particular, the highlight of the conventional nine-patch may extend in a left or right direction or in an up or down direction by applying different transformation in each sub area. In this case, the transformation methods may include coordinate translation, horizontal direction scale (or horizontal stretch), vertical direction scale (or vertical stretch), etc.
FIG. 2B is a view provided to explain a method for extending the width of a highlight according to the nine-patch method. To be specific, in order to extend the width of a highlight, the horizontal direction scale may be applied to the areas of 2 and 8 from among the areas constituting the highlight of the nine-patch method. In this case, only the coordinate translation can be applied to the areas excluding the areas of 2 and 8.
FIG. 2C is a view provided to explain a method for extending the length of a highlight according to the nine-patch method. To be specific, in order to extend the length of a highlight, the vertical direction scale may be applied to the areas of 4 and 6 from among the areas constituting the highlight of the nine-patch method. In this case, only the coordinate translation can be applied to the areas excluding the areas of 4 and 6.
As described above, in order to represent a highlight according to the nine-patch method, a total of 8 source images are required. To be specific, in order to represent a highlight according to the nine-patch method, 4 source images are required for the corners of the highlight, and 4 source images are required for the sides of the highlight. However, no source image is required for the area of 5 as a menu item is displayed in the area of 5.
FIG. 2D is a view provided to explain a method for representing a highlight according to the nine-patch method. First of all, the upper side is drawn by extending the first source image in the horizontal direction, and the lower side is drawn by extending the second source image in the horizontal direction. The left side is drawn by extending the third source image in the vertical direction and the right side is drawn by extending the fourth source image in the vertical direction. The 4 corners are drawn by using the fifth to the eighth source images.
As described above, if a plurality of source images are used to draw each side and each corner, the same scale computation needs to be applied to the area having the same shape twice (for example, the areas of 2 and 8) and thus, the amount of computation increases. In addition, a total of 8 images should be stored in order to draw a highlight and thus, the storage space of a memory may be taken up unnecessarily, thereby increasing the amount of resources used.